<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TranslatedCopy>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% 
        Html.EnableClientjQueryValidation();
        var article = (Article)ViewData["Article"];
        var culture = (System.Globalization.CultureInfo)ViewData["TargetCulture"];
    %>
    <div style="display: block;">
    </div>
    <div class="ui-corner-top ui-widget-content" style="clear: left; margin-top: 10px;">
        <div class="ui-widget-header ui-corner-top" style="padding: 10px; border-top: none;
            border-left: none; border-right: none;">
            <h2>
                <%: Html.Global("RES_TRANSLATE") %>: <u>
                    <%: Html.ActionLink(article.Title,"Edit","Article",new{id=article.ID},null) %>
                </u>
            </h2>
        </div>
        <% using (Html.BeginForm())
           {%>
           <%:Html.AntiForgeryToken() %>
           <input name="LCID" type="hidden" value="<%:culture.LCID %>" />
        <table style="width: 100%" cellpadding="5" cellspacing="5">
            <tr>
                <td align="right" style="white-space: nowrap;">
                    <%: Html.Global("RES_TRANSLATE_TO") %>:
                </td>
                <td colspan="2">
                    <%:culture.DisplayName %>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 80px;">
                    <%: Html.Global("RES_TITLE") %>:
                </td>
                <td style="width: 300px;">
                    <%=Ajax.TextBox("Title", Model!=null? Model.Title:"", new TextBoxOptions() { Width = 300 })%>
                </td>
                <td>
                    <%:Html.ValidationMessageFor(m=>m.Title,"*") %>
                </td>
            </tr>
            <tr>
                <td align="right" valign="top">
                    <%: Html.Global("RES_SUMMARY") %>:
                </td>
                <td>
                    <%=Ajax.TextArea("Summary", Model!=null?Model.Summary:"", new { cols = 10, rows = 5 })%>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="3" class="ui-widget-content">
                    <div>
                        <%=Ajax.RichTextBox("Body", Model!=null?Model.Body:"")%>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <div style="padding: 10px" align="center">
                        <%=Ajax.Submit(Html.Global("RES_SAVE"), "ui-icon ui-icon-disk")%>
                    </div>
                </td>
            </tr>
        </table>
        <%} %>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<%:Html.ScriptRefs(new string[] { "jquery.validate.min.js", "MicrosoftMvcJQueryValidation.js" })%>
</asp:Content>
